package com.angel.email.configuration.builders.impl.freeserve;

import com.angel.common.keyValue.KeyValueResult;
import com.angel.common.keyValue.impl.KeyValueImpl;
import com.angel.common.keyValue.impl.KeyValueResultImpl;
import com.angel.email.account.AccountInformation;
import com.angel.email.configuration.builders.IncomingEmailConfigurationBuilder;
import com.angel.email.constants.EmailPropertyConstants;
import com.angel.email.provider.ProviderType;

/**
 *
 * @author William
 *
 */
public class FreeserveIncomingEmailConfigurationBuilder extends IncomingEmailConfigurationBuilder {

	
	public FreeserveIncomingEmailConfigurationBuilder(AccountInformation accountInformation){
		super(accountInformation);
	}

	public KeyValueResult buildIncomingEmailConfiguration() {
		KeyValueResult result = new KeyValueResultImpl();

		result.addKeyValue(new KeyValueImpl(EmailPropertyConstants.EMAIL_PROVIDER, ProviderType.POP3.getProvider()));
		result.addKeyValue(new KeyValueImpl(EmailPropertyConstants.EMAIL_INCOMING_URL, "pop.freeserve.com"));
		result.addKeyValue(new KeyValueImpl(EmailPropertyConstants.EMAIL_INCOMING_PORT, "110"));
		//result.addKeyValue(new KeyValueImpl(PopEmailPropertyConstants.POP3_SOCKET_FACTORY_FALLBACK, Boolean.FALSE.toString()));
		//result.addKeyValue(new KeyValueImpl(PopEmailPropertyConstants.POP3_SOCKET_FACTORY_PORT, "110"));

		/** For incoming google email, it must enable SSL socket factory. */
		//result.addKeyValue(new KeyValueImpl(PopEmailPropertyConstants.POP3_SOCKET_FACTORY_CLASS, "javax.net.ssl.SSLSocketFactory"));

		return result;
	}


}
